package com.guigu.dealservice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 纠纷表（存储交易过程中的纠纷及处理记录）
 * </p>
 *
 * @author ysp
 * @since 2025-10-10
 */
public class Dispute implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 纠纷唯一标识
     */
    @TableId(value = "dispute_id", type = IdType.AUTO)
    private Long disputeId;

    /**
     * 关联订单表order_id（唯一，一个订单仅一个纠纷记录）
     */
    private Long orderId;

    /**
     * 关联用户表user_id（买家，纠纷发起方或参与方）
     */
    private Long buyerId;

    /**
     * 关联用户表user_id（卖家，纠纷参与方）
     */
    private Long sellerId;

    /**
     * 纠纷原因（如"设备与描述不符"、"逾期未发货"）
     */
    private String disputeReason;

    /**
     * 纠纷证据（图片URL，多个用逗号分隔，如聊天记录、设备照片）
     */
    private String disputeEvidence;

    /**
     * 纠纷状态（0-待受理，1-处理中，2-已解决，3-仲裁中，4-仲裁完成）
     */
    private Boolean disputeStatus;

    /**
     * 纠纷申请时间（买家/卖家发起纠纷的时间）
     */
    private LocalDateTime applyTime;

    /**
     * 受理时间（dispute_status=1时必填，客服接收纠纷的时间）
     */
    private LocalDateTime acceptTime;

    /**
     * 关联操作员表operator_id（处理客服，dispute_status=1时必填）
     */
    private Long handlerId;

    /**
     * 处理方案（dispute_status=1时填写，如"退款5000元"）
     */
    private String processingPlan;

    /**
     * 仲裁结果（dispute_status=4时必填，平台仲裁的最终结论）
     */
    private String arbitrationResult;

    /**
     * 仲裁时间（dispute_status=4时必填，仲裁结果生成的时间）
     */
    private LocalDateTime arbitrationTime;

    /**
     * 解决时间（dispute_status=2时必填，纠纷完全处理完成的时间）
     */
    private LocalDateTime solveTime;

    /**
     * 记录创建时间
     */
    private LocalDateTime createTime;

    /**
     * 记录更新时间
     */
    private LocalDateTime updateTime;

    public Long getDisputeId() {
        return disputeId;
    }

    public void setDisputeId(Long disputeId) {
        this.disputeId = disputeId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getBuyerId() {
        return buyerId;
    }

    public void setBuyerId(Long buyerId) {
        this.buyerId = buyerId;
    }

    public Long getSellerId() {
        return sellerId;
    }

    public void setSellerId(Long sellerId) {
        this.sellerId = sellerId;
    }

    public String getDisputeReason() {
        return disputeReason;
    }

    public void setDisputeReason(String disputeReason) {
        this.disputeReason = disputeReason;
    }

    public String getDisputeEvidence() {
        return disputeEvidence;
    }

    public void setDisputeEvidence(String disputeEvidence) {
        this.disputeEvidence = disputeEvidence;
    }

    public Boolean getDisputeStatus() {
        return disputeStatus;
    }

    public void setDisputeStatus(Boolean disputeStatus) {
        this.disputeStatus = disputeStatus;
    }

    public LocalDateTime getApplyTime() {
        return applyTime;
    }

    public void setApplyTime(LocalDateTime applyTime) {
        this.applyTime = applyTime;
    }

    public LocalDateTime getAcceptTime() {
        return acceptTime;
    }

    public void setAcceptTime(LocalDateTime acceptTime) {
        this.acceptTime = acceptTime;
    }

    public Long getHandlerId() {
        return handlerId;
    }

    public void setHandlerId(Long handlerId) {
        this.handlerId = handlerId;
    }

    public String getProcessingPlan() {
        return processingPlan;
    }

    public void setProcessingPlan(String processingPlan) {
        this.processingPlan = processingPlan;
    }

    public String getArbitrationResult() {
        return arbitrationResult;
    }

    public void setArbitrationResult(String arbitrationResult) {
        this.arbitrationResult = arbitrationResult;
    }

    public LocalDateTime getArbitrationTime() {
        return arbitrationTime;
    }

    public void setArbitrationTime(LocalDateTime arbitrationTime) {
        this.arbitrationTime = arbitrationTime;
    }

    public LocalDateTime getSolveTime() {
        return solveTime;
    }

    public void setSolveTime(LocalDateTime solveTime) {
        this.solveTime = solveTime;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "Dispute{" +
        "disputeId = " + disputeId +
        ", orderId = " + orderId +
        ", buyerId = " + buyerId +
        ", sellerId = " + sellerId +
        ", disputeReason = " + disputeReason +
        ", disputeEvidence = " + disputeEvidence +
        ", disputeStatus = " + disputeStatus +
        ", applyTime = " + applyTime +
        ", acceptTime = " + acceptTime +
        ", handlerId = " + handlerId +
        ", processingPlan = " + processingPlan +
        ", arbitrationResult = " + arbitrationResult +
        ", arbitrationTime = " + arbitrationTime +
        ", solveTime = " + solveTime +
        ", createTime = " + createTime +
        ", updateTime = " + updateTime +
        "}";
    }
}
